<?php

namespace App\Models\ReturnProduct;

use App\Services\Locale\Language;
use App\Services\MobileApp\AppEnv;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;

/**
 * Class ReturnHistory
 * @property string comment
 * @package App\Models\ReturnProduct
 *
 * @mixin Builder
 */

class ReturnHistory extends Model
{
    protected $table = 'return_history';
    protected $guarded = [];

    public $timestamps = false;

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function returnStatus()
    {
        return $this->belongsTo(ReturnStatus::class, 'return_status_id', 'return_status_id')
            ->where('language_id', AppEnv::languageId());
    }
}
